package com.example.selfcontrol.entity.Mongo;


import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Date;

@Data
@Document
public class MongoArticleInfo {
    // 使用MongoDB 快速响应文章正文
    @Id
    private String id ;

    private Long articleId ;

    private Long authorId ;

    private String content ;

    private Long articleCategory ;
    private Date createtime ;

    public MongoArticleInfo(Long articleId, Long authorId, String content, Long articleCategory, Date createtime) {
        this.articleId = articleId;
        this.authorId = authorId;
        this.content = content ;
        this.articleCategory = articleCategory;
        this.createtime = createtime;
    }
}
